package com.example.foobar.dao.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.example.foobar.entity.DaNewCommerCount;
import com.example.foobar.param.DaNewCommerCountPageParam;
import com.example.foobar.utils.DateRange;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.framework.core.pagination.Paging;

import java.util.Date;
import java.util.List;

/**
 * 新增用户数记录 服务类
 *
 * @author 郑英奔
 * @since 2021-05-31
 */
public interface DaNewCommerCountDaoService extends BaseService<DaNewCommerCount> {

    /**
     * 保存
     *
     * @param daNewCommerCount
     * @return
     * @throws Exception
     */
    boolean saveDaNewCommerCount(DaNewCommerCount daNewCommerCount) throws Exception;

    /**
     * 修改
     *
     * @param daNewCommerCount
     * @return
     * @throws Exception
     */
    boolean updateDaNewCommerCount(DaNewCommerCount daNewCommerCount);

    /**
     * 删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    boolean deleteDaNewCommerCount(Long id) throws Exception;


    /**
     * 获取分页对象
     *
     * @param daNewCommerCountPageParam
     * @return
     * @throws Exception
     */
    Paging<DaNewCommerCount> getDaNewCommerCountPageList(DaNewCommerCountPageParam daNewCommerCountPageParam) throws Exception;

    int insert(DaNewCommerCount daNewCommerCount);

    int deleteByWrapper(Wrapper<DaNewCommerCount> wrapper);

    void insertIfNotExist(DaNewCommerCount daNewCommerCount);

    List<DaNewCommerCount> getDaNewCommerByUniacidAndDate(Integer uniacid, Date baseDate);
}
